package com.design.principle.openclose;

/**
 * @program: designPattern
 * @description:
 * @author: STU756
 * @create: 2021-01-18 23:41
 */
public class OpenCloseTest {
    public static void main(String[] args) {
        ICourse a = new JavaDiscountCourse(1, "Java", 7000D);
        JavaDiscountCourse java = (JavaDiscountCourse)a;
        System.out.println("课程ID: " + java.getId() +
                            "\n课程标题： " + java.getName() +
                            "\n原价： " +  java.getDisCountPrice()+
                            "\n售价： " + java.getPrice());
    }
}
